const express = require('express');
const app = express();
const router = express.Router();
const deplay = require("../services/deplay");

// router.get("sendGroup", (req, res) => {

// });

// router.post("/sass", deplay.deploy, (req, res) => {
//     res.redirect("admin/projects/view/dash");
// })

router.post("/backend", deplay.backend, (req, res) => {
    res.redirect("/admin/projects/view/record");
})

router.get("/record", deplay.record, (req, res) => {
    res.render("admin/pages/depolyRecord");
});

router.post("/applet", deplay.wxApplet, (req, res) => {
    res.redirect("/admin/projects/view/record");
});

router.get("/view/form", (req, res) => {
    res.render("admin/pages/publishConfig");
})

router.get("qrcode", (req, res) => {
    // 使用示例
    // autoDeploy.generateQR();
});

router.post("/notifi/switch", deplay.switchNotifi);

module.exports = router;